import cv2 as cv


def main():
    img1 = cv.imread('../data/test.png')
    img2 = cv.imread('../data/logo.png')
    if img1 is None or img2 is None:
        print("错误: 无法读取图片!")
        exit(0)

    print(f"图片1尺寸: {img1.shape}, 图片2尺寸: {img2.shape}")
    img3 = cv.resize(img2, (img1.shape[1], img1.shape[0]))
    print(f"调整后图片3尺寸: {img3.shape}")

    dst = cv.addWeighted(img1, 0.7, img3, 0.3, 0)
    cv.imshow('Press any key to exit', dst)
    cv.waitKey(0)
    cv.destroyAllWindows()


if __name__ == "__main__":
    main()
